{include file="index/header" /}

<h3>发布课程</h3>

 <form  action="" method="post" enctype="multipart/form-data">
  <div class="form-group" >
    <!-- <label for="exampleInputName2">留言标题title:</label> -->
    <input type="text" class="form-control" id="title" name="title" value="" placeholder="请输入课程标题" maxlength="100">

  </div>

<!--  <div class="form-group" >
    <label for="exampleInputName2">选择上传视频课件:</label>
     <input type="file" name="lesson" />

  </div> -->

    <div class="form-group" >
    <label for="exampleInputName2">价格:</label>
    <input type="text" class="form-control"  name="price" value="0" placeholder="商品价格" maxlength="100">

  </div>
  <div class="form-group" >
    <label for="exampleInputName2">标签:</label>
    <input type="text" class="form-control"   name="label" value="" placeholder="标签" maxlength="100">

  </div>
  <div class="form-group" >
    <label for="exampleInputName2">序号:</label>
    <input type="text" class="form-control"  name="sort" value="" placeholder="序号" maxlength="100">

  </div>
  <div class="form-group" >
    <!-- <label for="exampleInputName2">留言标题title:</label> -->
    <input type="text" class="form-control"  name="address" value="" placeholder="视频开关" maxlength="500">

  </div>
  <div class="form-group">
    <!-- <label for="exampleInputPassword1">留言内容content:</label> -->
   <textarea class="form-control" rows="3"    name="product"  value="" placeholder="购买后内容"></textarea>
  </div>
  <!-- <div class="form-group"> -->
    <!-- <label for="exampleInputPassword1">留言内容content:</label> -->
  <!--  <textarea class="form-control" rows="3"  id="content99" name="content99"  value="" placeholder="请输入课程内容"></textarea>

  </div> -->
  <div class="form-group">


 <script id="content" name="content" type="text/plain">
        
    </script>

  <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/lang/zh-cn/zh-cn.js"></script>


<script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>

    <script id="content" name="content" type="text/plain">
        
    </script>

  <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/lang/zh-cn/zh-cn.js"></script>


<script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>



  </div>

 

 <div class="form-group" >

  <button type="submit" id="btn" class="btn btn-primary"  >发布课程</button>
</div>

</form>

 {include file="index/footer" /}

 <!DOCTYPE HTML>
<html lang="en-US">

<head>
    <meta charset="UTF-8">
    <title>ueditor demo</title>
</head>

<body><button onclick="getText()">获得当前选中的文本</button>
    <!-- 加载编辑器的容器 -->
    
    <!-- 配置文件 -->
    <script type="text/javascript" src="ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('content');

        function getText() {
        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
        var range = UE.getEditor('editor').selection.getRange();
        range.select();
        var txt = UE.getEditor('editor').selection.getText();
        alert(txt)
    
    }
    </script>
    
</body>

</html>